<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta  charset="utf-8">
<meta  name="viewport"  content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>会员资料提交</title>
<link  rel="stylesheet"  href="../addons/feng_recharge/template/css/css.css?v=654">
<script   src="../addons/feng_recharge/template/js/zepto.min.js" type="text/javascript"></script>
</head>
<body  style="background:#f6f6f8;">
<section  class="top_bar"> 
	<a  href="javascript:history.back(-1);"   title="返回"  class="back"><i  class="b_arr"></i>返回</a>
	<a  href="{php echo $this->createMobileUrl('index')}"  title="首页"  class="home">首页</a>
	<h2  id="oneNavTitle">会员资料</h2>
</section>
<section  class="wrap">
<section  class="address">
<div  class="addr_info">
	<form id="form1" action="javascript:;" method="post">
	<p  class="tips">个人信息</p>
    <ul>
    	<li><label  class="lb">真实姓名</label><input  id="realname"  class="ipt"  value="{$people['realname']}"  type="text"  placeholder="请输入您的真实姓名"></li>
	 	<li><label  class="lb">手机号码</label><input  id="mobile"  class="ipt"  value="{$people['mobile']}"  type="text"  placeholder="请输入正确手机号码"></li>
		<li><label  class="lb">所属城市</label>
		<select id="addr" class="ipt">
			{loop $residetype $key $type}
			<option value="{$type}" {if $people['resideprovince'] == $type} selected="selected" {/if}>{$type}</option>
			{/loop}
		</select>
		</li>
	</ul>
	<p  class="tips">其他信息(选填,铁通用户请填写)</p>
    <ul>
    	<li><label  class="lb">电话号码</label><input  id="tel"  class="ipt"  value="{$people['tel']}"  type="text"  placeholder="请输入您的电话号码"></li>
	 	<li><label  class="lb">宽带号码</label><input  id="broadband"  class="ipt"  value="{$people['broadband']}"  type="text"  placeholder="请输入您的宽带号码"></li>
	</ul>
	</form>
</div>
<div  class="save_opt">
	<p  id="oneSaveTips"  class="s_tips"  style="">为保证会员信息正确<span  class="fc3">请确认无误后再保存</span></p>
	<a  id="oneSaveAddr"  href="javascript:submit1();"  title="提交"  class="chk_btn"  style="">提交</a>
</div>
<div style="margin-top: 6rem;">
</div>
</section>
</section>
</body>
<script type="text/javascript">
	function submit1(){	    
    	var form_input = document.getElementById("form1");
    	var realname = form_input['realname'].value;
    	var mobile = form_input['mobile'].value;
		var resideprovince = form_input['addr'].value;
		var tel=form_input['tel'].value;
		var broadband=form_input['broadband'].value;
		if (!realname) {
			alert('请输入您的真实姓名！');
			return false;
		}
		if (!resideprovince) {
			alert('请选择您的地区！');
			return false;
		}
		/*if (!tel && !broadband) {
			alert('请输入电话号码或宽带号码！');
			return false;
		}*/
		if (!mobile) {
			alert('请输入您的手机号码！');
			return false;
		}
		if (!/^1[358]{1}[0-9]{9}/.test(mobile)) {
			alert('您填写的电话号码不正确，请重填。！');
			return false;
		}
		
		var message=confirm('请确认您的信息');
		if (message) {
        	$.post('{php echo $this->createMobileUrl('ajaxsubmit',array('uid'=>$_W['member']['uid']))}',{realname:realname,mobile:mobile,resideprovince:resideprovince,tel:tel,broadband:broadband},function(m){
        	alert(m);
        	window.location.href="{php echo $this->createMobileUrl('index')}";
        	},"html");
        };
    }
</script>
</html>